package com.xiyu.service.enums.mailbox.protocol;

import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Arrays;
import com.xiyu.service.enums.common.IntArrayValuable;

/**
* 邮箱协议类型
*/
@Getter
@AllArgsConstructor
public enum MailboxProtocolEnum implements IntArrayValuable {

    /**
    * IMAP
    */
    IMAP(2, "IMAP"),
    /**
    * POP
    */
    POP(3, "POP");

    private final Integer value;

    private final String label;

    public static final int[] VALUES = Arrays.stream(values()).mapToInt(MailboxProtocolEnum::getValue).toArray();

    @Override
    public int[] getValues() { return VALUES;}

    public static final String[] LABELS = Arrays.stream(values()).map(MailboxProtocolEnum::getLabel).toArray(String[]::new);

    @Override
    public String[] getLabels() { return LABELS; }

}
